package ua.com.hackaton.core;

import android.graphics.Color;
import android.graphics.Paint;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Eugene Borshch
 * Date: 6/25/11
 * Time: 4:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class Colors
{
    public static List<Paint> citrus = new ArrayList<Paint>();
    public static List<Paint> goldfish = new ArrayList<Paint>();
    public static List<Paint> audacity = new ArrayList<Paint>();
	private static List<Paint> pinky = new ArrayList<Paint>();
	private static List<Paint> spring = new ArrayList<Paint>();


    public static final Paint DEFAULT_FILL_PAINT = new Paint(
            Paint.ANTI_ALIAS_FLAG);

    static
    {
        DEFAULT_FILL_PAINT.setColor(Color.YELLOW);
        DEFAULT_FILL_PAINT.setStyle(Paint.Style.FILL);
    }


    static
    {
    	pinky.add(createPaint(Color.parseColor("#F749AE")));
    	pinky.add(createPaint(Color.parseColor("#F749E8")));
    	pinky.add(createPaint(Color.parseColor("#FBAAD9")));
    	pinky.add(createPaint(Color.parseColor("#A0A0A0")));
    	pinky.add(createPaint(Color.parseColor("#FFFFFF")));

    	spring.add(createPaint(Color.parseColor("#41DB00")));
    	spring.add(createPaint(Color.parseColor("#4EA429")));
    	spring.add(createPaint(Color.parseColor("#2B8E00")));
    	spring.add(createPaint(Color.parseColor("#70ED3B")));
    	spring.add(createPaint(Color.parseColor("#92ED6B")));
    	spring.add(createPaint(Color.parseColor("#00A08A")));
    	spring.add(createPaint(Color.parseColor("#1E786C")));
    	spring.add(createPaint(Color.parseColor("#00685A")));
    	spring.add(createPaint(Color.parseColor("#34D0BA")));
    	spring.add(createPaint(Color.parseColor("#5DD0C0")));
    	spring.add(createPaint(Color.parseColor("#C3F500")));
    	spring.add(createPaint(Color.parseColor("#9CB72E")));
    	spring.add(createPaint(Color.parseColor("#7F9F00")));
    	spring.add(createPaint(Color.parseColor("#D4FA3E")));
    	spring.add(createPaint(Color.parseColor("#DEFA70")));

        //TODO convert int to hex
        /*    citrus.add(new Color(70, 102, 66));
     citrus.add(new Color(153, 142, 61));
     citrus.add(new Color(229, 156, 44));
     citrus.add(new Color(255, 116, 37));*/

        goldfish.add(createPaint(Color.rgb(0xe5, 0x6a, 0x00)));
        goldfish.add(createPaint(Color.rgb(0xcc, 0xc7, 0x94)));
        goldfish.add(createPaint(Color.rgb(0x99, 0x91, 0x7c)));
        goldfish.add(createPaint(Color.rgb(0x58, 0x59, 0x56)));
        goldfish.add(createPaint(Color.rgb(0x30, 0x30, 0x33)));

        /* audacity.add(new Color(181, 40, 65));
     audacity.add(new Color(255, 192, 81));
     audacity.add(new Color(255, 137, 57));
     audacity.add(new Color(232, 95, 77));
     audacity.add(new Color(89, 0, 81));*/

        audacity.add(createPaint(Color.rgb(255, 192, 81)));
        audacity.add(createPaint(Color.rgb(255, 192, 81)));
        audacity.add(createPaint(Color.rgb(255, 137, 57)));
        audacity.add(createPaint(Color.rgb(232, 95, 77)));
        audacity.add(createPaint(Color.rgb(89, 0, 81)));
    }

    private static Paint createPaint(int color)
    {
        Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        paint.setColor(color);
        return paint;
    }
    
	public List<Paint> getPaints(int choice)
	{
		List<Paint> activePaints = null;
		switch (choice)
		{
		case 1:
			activePaints = spring;
			break;
		case 2:
			activePaints = pinky;
			break;
		case 3:
			activePaints = goldfish;
			break;
		}
		return activePaints;
	}
}
